﻿using System;
using System.Collections.Generic;
using System.Text;
using XMK.Utils;
using System.Reflection;

namespace XMK.Framework.Model.Sp
{
    /// <summary>
    /// Ajax方法
    /// </summary>
    internal class SpMethod
    {
        #region 私有变量
        private Object dataInstance;
        private MethodInfo method;
        #endregion
        #region 只读属性
        /// <summary>
        /// sp关联数据处理对象
        /// </summary>
        public Object DataInstance { get { return dataInstance; } }
        /// <summary>
        /// sp方法实际对应的方法
        /// </summary>
        public MethodInfo Method { get { return method; } }
        #endregion
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="instance">Ajax方法关联的对象</param>
        /// <param name="paramTypes">Ajax方法需要的参数列表</param>
        /// <param name="method">Ajax方法实际对应的方法</param>
        public SpMethod(Object instance, MethodInfo method)
        {
            this.dataInstance = instance;
            this.method = method;
        }
    }
}
